package com.sunday.common.mq.kafka.study.spring.e21_Brave_Trace_Pull;

import com.sunday.common.mq.kafka.brave.autoconfiguration.KafkaTracingAutoConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.kafka.config.TopicBuilder;

/**
 * https://docs.spring.io/spring-kafka/docs/current/reference/html/#streams-kafka-streams
 */
@Slf4j
@Import(KafkaTracingAutoConfiguration.class)
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Bean
    public NewTopic topic15() {
        return TopicBuilder.name("topic15")
                .partitions(3)
                .replicas(1)
                .build();
    }


}
